package com.hxkj.controller.article;


import com.hxkj.domain.po.MqInfo;
import com.hxkj.service.article.MqInfoService;
import com.platform.common.domain.result.ResultPageStruct;
import com.platform.common.domain.to.PageTo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.Callable;

/**
 *  @desc mq消息队列管理界面
 *  @author yaosy
 *  @date 2018年9月6日15:04:31
 * **/
@RestController
@RequestMapping("/mqinfo")
public class MqInfoController {


    @Autowired
    private MqInfoService mqInfoService;

    /**
     * mq消息队列管理界面
     *
     * @param mqInfo pageParam
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/getMqInfoList", method = RequestMethod.POST)
    public Callable<ResultPageStruct<MqInfo>> getMqInfoList(@ModelAttribute MqInfo mqInfo, @ModelAttribute PageTo pageParam) throws Exception {
        return () -> mqInfoService.getMqInfoList(mqInfo == null ? new MqInfo() : mqInfo, pageParam);
    }
}
